<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script src="../index.js"></script>

    <script>
        // 深拷贝
        let arr = [1, 2, 3, 44]
        let bArr = spanman.deepCopy(arr)
        console.log("bArr---->", bArr)

        // 删除数组中的某项
        let arr2 = [1, 2, 3, 44]
        let arr3 = spanman.remove(arr2, 3)

        console.log("arr2---->", arr2) // 删除之后的对象
        console.log("arr3---->", arr3) // 被删除的项
    </script>

    <div id="myTree">

    </div>
    <script src="../utils/tree.js"></script>
    <script>
        let myTree = new MyTree({
            id: "myTree",
            data: [
                {
                    id: 1,
                    pid: 0,
                    text: "1"
                },
                {
                    id: 11,
                    pid: 1,
                    text: "1-1"
                },
                {
                    id: 12,
                    pid: 1,
                    text: "1-2"
                },
                {
                    id: 2,
                    pid: 0,
                    text: "2"
                },
                {
                    id: 21,
                    pid: 2,
                    text: "2-1"
                },
            ]
        })



        console.log("去重--对象数组-->", spanman.unique([{ a: 1 }, { a: "1" }, {}], "a"))

        console.log("sheetname 的处理 --->", spanman.formate_sheet_name("1234567890123456789012345678901234567890"))
        console.log("sheetname 的处理 --->", spanman.formate_sheet_name("\sadad\\\asdadad[]]?dsada*sad"))
    </script>
</body>

</html>